<extend name="Common@Layout:hui-admin" />
<block name="title"><title>分类分组管理</title></block>
<block name="style">
</block>

<block name="main">
	<div class="pd-20">
		<div class="cl pd-5 bg-1 bk-gray mt-20"> 
			<span class="l"> 
				<a href="javascript:;" class="btn btn-danger radius ajax-post confirm" target-form="mini-form" data-msg="确定批量删除？" data-url="{:U('catsadmin/delgroup')}"><i class="Hui-iconfont"></i> 批量删除</a> 
				<a class="btn btn-primary radius" href="javascript:;" onclick="open_iframe_dialog('{:U('catsadmin/editgroup')}','添加分组',['600px','350px'],1)"><i class="Hui-iconfont"></i> 添加分组</a> 
			</span> 
		</div>
		<php>
			$path = '/material/catsadmin/indexgroup/';
			$_GET['p']?$cur = $_GET['p']:$cur = 1;
			if($_GET['appid']) $map['appid'] = $_GET['appid'];
			$data = _uiclist(D('CatsGroup'),$map,$cur,10,'',1);
			$pagetpl = _to_page($data['count'],$cur,10,$path.'p/');
		</php>
		<form class="mini-form">
		<table class="table table-border table-bordered table-hover table-bg mini-sort">
			<thead>
				<tr>
					<th scope="col" colspan="12">分类分组管理</th>
				</tr>
				<tr class="text-c">
					<th width="25"><input type="checkbox" value="" name=""></th>
					<th width="40">ID</th>
					<th>分组名</th>
					<th>分组Key</th>				
					<th width="70">操作</th>
				</tr>
			</thead>
			<tbody>
				<foreach name="data['list']" item="vo">
				<tr class="text-c">
					<td><input type="checkbox" value="{$vo.appid}" name="ids[]"></td>
					<td>{$vo.group_id}</td>
					<td>{$vo.group_name}</td>
					<td>{$vo.group_key}</td>
					<td class="f-14">
            			<a style="text-decoration:none" class="ml-5" onclick="open_iframe_dialog('{:U('catsadmin/editgroup','id='.$vo['group_id'])}','修改分组',['600px','350px'],1)" href="javascript:;" title="编辑"><i class="Hui-iconfont"></i></a>
            			<a style="text-decoration:none" class="ml-5 mini_del" data-url="{:U('catsadmin/delgroup','ids='.$vo['group_id'])}" href="javascript:;" title="删除"><i class="Hui-iconfont"></i></a>
					</td>
				</tr>
				</foreach>
			</tbody>
		</table>
		</form>
		{$pagetpl}
	</div>
</div>
</block>

<block name="script">

<script>

//$('.mini-sort').dataTable();

$(function(){
	$('.mini-time').datepicker();
});

</script>
</block>